import { observer } from '@kit.TelephonyKit';

export class TaskModel {
    actualArrivalTime: string;
    actualDepartureTime: string;
    created: string;
    driverId: string;
    enablePickUp: boolean;
    endAddress: string;
    endAgencyId: number;
    finishHandover: string;
    id: string;
    planArrivalTime: string;
    planDepartureTime: string;
    startAddress: string;
    startAgencyId: number;
    startHandover: string;
    status: string;
    transportTaskId: string;
}


export interface TaskListParams{
    page:string
    pageSize:number
    startTime:string
    endTime:string
    status:string
    transportTaskId:number
}

export class TaskListModel {
    counts: number;
    items: TaskModel[];
    page: number;
    pageSize: number;
    pages: string;
}

export interface TaskDetailParams{
    id:string
    time?:string
    index?:number
    params:string
}

export interface imageUrl {
    url: string;
}


export interface  TaskDetailModel {
    id: string;
    startAgencyId: string;
    startProvince: string;
    startCity: string;
    startAddress: string;
    endAgencyId: string;
    endProvince: string;
    endAddress: string;
    endCity: string;
    status: number;
    driverId: string;
    transportTaskId: string;
    startHandover: string;
    startHandoverPhone: string;
    finishHandover: string;
    finishHandoverPhone: string;
    planDepartureTime: string;
    actualDepartureTime: string;
    planArrivalTime: string;
    actualArrivalTime: string;
    licensePlate: string;
    driverName: string;
    cargoPickUpPictureList: imageUrl[];
    cargoPictureList: imageUrl[];
    transportCertificateList: imageUrl[];
    deliverPictureList: imageUrl[];
    exceptionList:exceptionModel[]
}

export interface deliveryParams{
    id:string
    cargoPickUpPictureList:imageUrl[]
    cargoPictureList:imageUrl[]
}

export interface deliveredParams{
    id:string
    deliverPictureList:imageUrl[]
    certificatePictureList:imageUrl[]
}

export interface backCarParams{
    id: string,
    startTime: string,
    endTime: string,
    isAccident: boolean,
    isAvailable: boolean,
    isBreakRules: boolean,
    isFault: boolean
}

export interface latePikeUpParams{
    delayReason:string,
    delayTime:string,
    id:string
}

export interface reportExceptionParams{
    transportTaskId:string,
    exceptionTime:string,
    exceptionPlace:string,
    exceptionType:string
    exceptionDescribe:string,
    exceptionImagesList:imageUrl[]
}

export interface  exceptionModel{
    transportTaskId: string;
    exceptionTime: string;
    exceptionPlace: string;
    exceptionType: string;
    exceptionDescribe: string;
    exceptionImagesList: imageUrl[];
    handleResult:string
}
